package com.edison.service;

import com.edison.feign.DemoService2;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author edison
 */
@Service
@Slf4j
public class DemoService {

    @Autowired
    private DemoService2 demoService2;
    public String test(String type) throws InterruptedException {
        log.info("service-1 的服务层对请求开始进行业务处理");

        Thread.sleep(1000);

        log.info("service-1 的服务层对请求进行业务处理完毕");
        log.info("service-1 调用 service-2 继续处理业务");
        return demoService2.test(type);
    }

    public void disturbLog(){
        for (int i = 0; i < 100; i++) {
            log.info("这都是其他服务的干扰日志:{}",i);

        }
    }
}
